
pkgname=autoconf
pkgver=2.69
pkgrel=5
pkgdesc="Package of M4 macros that produce shell scripts to automatically configure software source code packages."
arch=('x86_64')
license=('GPL2' 'GPL3' 'custom')
url="https://www.gnu.org/software/autoconf"
groups=('base-devel')
depends=('awk' 'm4' 'diffutils' 'bash')
source=("https://ftp.gnu.org/gnu/autoconf/${pkgname}-${pkgver}.tar.xz")
md5sums=('50f97f4159805e374639a73e2636f22e')

build() {
  cd ${pkgname}-${pkgver}
  
  ./configure --prefix=/usr
  make 
}

check() {
  cd ${pkgname}-${pkgver}
  # 3 tests fail, known upstream
  # http://gnu-autoconf.7623.n7.nabble.com/GNU-Autoconf-2-69-testsuite-503-failed-td18489.html
  # https://lists.gnu.org/archive/html/bug-autoconf/2014-11/msg00001.html
  #make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install 

  install -Dm644 COPYING.EXCEPTION $pkgdir/usr/share/licenses/autoconf/COPYING.EXCEPTION
  rm -f ${pkgdir}/usr/share/info/standards.info
}
